﻿Public Class ven_pol3

    Private Sub btnok_ven_pol3_Click(sender As Object, e As EventArgs) Handles btnok_ven_pol3.Click
        yc3 = Convert.ToSingle(txtyc3_jp3.Text)
        fp13 = Convert.ToSingle(txt_fp13.Text)
        fp23 = Convert.ToSingle(txt_fp23.Text)
        dp13 = Convert.ToSingle(txt_dp13.Text)
        dp23 = Convert.ToSingle(txt_dp23.Text)
        tetap3 = Convert.ToSingle(txt_tetap3.Text)
        decp3 = Convert.ToSingle(txt_decp3.Text)

        tetap3 = tetap3 * (3.141592 / 180)
        alfap3 = Math.Asin((dp23 - dp13) / (2 * decp2))

        fxcp3 = -Math.Cos(alfap3) * (fp13 + fp23)
        fzcp3 = Math.Sin(alfap3) * (fp13 - fp23)

        fxp3 = fxcp3 * Math.Cos(tetap3) - fzcp3 * Math.Sin(tetap3)
        fzp3 = fxcp3 * Math.Sin(tetap3) + fzcp3 * Math.Cos(tetap3)

        c3x = fxp3
        c3y = 0
        c3z = fzp3
        m3x = 0
        m3y = -(fp13 + fp23) * dp13 * 0.5
        m3z = 0

        Me.Close()
    End Sub
End Class